﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Marbles.Core.Authentication.OpenID
{
    public class OpenIdToken : TokenBase, IToken
    {

        /// <summary>
        /// IdentityToken for OpenID provider
        /// </summary>
        public OpenIdToken(string Identity)
            : base()
        {
            _identity = Identity;
            _properties = new Dictionary<string, string>();
            _success = false;
            if (!string.IsNullOrEmpty(_identity))
            {
                LoadPermissions(_identity);
            }
        }

        protected override void LoadPermissions(string username)
        {
            QueryPermissions(username, "openid");
        }

    }
}